﻿@model BlackBox.News

@{
    ViewBag.Title = "Edit";
}

<div id="edit-news-page">
    <p>
        <a href="~/Home/Main">Home</a>
         >
        <a href="~/Home/News">News</a>
    </p>
@*<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>*@
@*<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>*@
    <h3>@Model.title</h3>
    <h5>Edit</h5>

    @using (Html.BeginForm("EditNews" ,"Home",FormMethod.Post,new {enctype="multipart/form-data"})) {
        @Html.ValidationSummary(true)
        <fieldset>
            <div>
                <div class="editor-label">
                    @Html.LabelFor(model => model.title)
                </div>

                <div class="editor-field">
                    @Html.EditorFor(model => model.title)
                </div>
            </div>

            <div>
                <div class="editor-label">
                    @Html.LabelFor(model => model.message)
                </div>

                <div class="editor-field">
                    @Html.TextAreaFor(model => model.message) 
                </div>
            </div>
            @*<p>*@
                <input type="submit" value="Save" />
            @*</p>*@
        </fieldset>
    }
    @*<div>*@
        @Html.ActionLink("Back to all news", "News")
    @*</div>*@
</div>